package domain;

import java.io.Serializable;
import java.util.ArrayList;

/**
 * Created by public1 on 2017/1/5.
 *
 * 代表一个视频或音频
 */

/*
trailers: [

{
id: 64025,
movieName: "《世纪战元》俄版预告片",
coverImg: "http://img5.mtime.cn/mg/2016/12/29/171514.54117187.jpg",
movieId: 233043,
url: "http://vfx.mtime.cn/Video/2016/12/29/mp4/161229134943070513_480.mp4",
hightUrl: "http://vfx.mtime.cn/Video/2016/12/29/mp4/161229134943070513.mp4",
videoTitle: "世纪战元 预告片2",
videoLength: 137,
rating: -1,
type: [
"动作",
"冒险",
"科幻"
],
summary: "战斗民族版“复联”集结"
},

{
id: 63996,
movieName: "《西游伏妖篇》动作版预告",
coverImg: "http://img5.mtime.cn/mg/2016/12/28/162417.51435462.jpg",
movieId: 208325,
url: "http://vfx.mtime.cn/Video/2016/12/27/mp4/161227204134063682_480.mp4",
hightUrl: "http://vfx.mtime.cn/Video/2016/12/27/mp4/161227204134063682.mp4",
videoTitle: "西游伏妖篇 打斗版预告片",
videoLength: 123,
rating: -1,
type: [
"动作",
"奇幻",
"喜剧",
"古装"
],
summary: "唐僧挥鞭打大圣 片尾有彩蛋"
}

        ]
*/

//实现Serializable接口 序列化对象，以便用Bundle putSerializable()传递数组对象
public class MediaItem implements Serializable {

    private String name;
    private long duration;
    private long size;
    private String data;
    private String artist;

    public String getName() {
        return name;
    }

    public long getDuration() {
        return duration;
    }

    public long getSize() {
        return size;
    }

    public String getData() {
        return data;
    }

    public String getArtist() {
        return artist;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setDuration(long duration) {
        this.duration = duration;
    }


    public void setSize(long size) {
        this.size = size;
    }

    public void setData(String data) {
        this.data = data;
    }

    public void setArtist(String artist) {
        this.artist = artist;
    }

    @Override
    public String toString() {
        return "MediaItem{" +
                "name='" + name + '\'' +
                ", duration=" + duration +
                ", size=" + size +
                ", data='" + data + '\'' +
                ", artist='" + artist + '\'' +
                '}';
    }



    /////////////////

    private int id;
    private String movieName;
    private String coverImg;
    private int movieId;
    private String url;
    private String hightUrl;
    private String videoTitle;
    private int videoLength;
    private int rating;
    private ArrayList<String> type;
    private String summary;

    public void setId(int id) {
        this.id = id;
    }

    public void setMovieName(String movieName) {
        this.movieName = movieName;
    }

    public void setCoverImg(String coverImg) {
        this.coverImg = coverImg;
    }

    public void setMovieId(int movieId) {
        this.movieId = movieId;
    }

    public void setUrl(String url) {
        this.url = url;
        this.data = url;
    }

    public void setHightUrl(String hightUrl) {
        this.hightUrl = hightUrl;
        this.data = hightUrl;
    }

    public void setVideoTitle(String videoTitle) {
        this.videoTitle = videoTitle;
    }

    public void setVideoLength(int videoLength) {
        this.videoLength = videoLength;
    }

    public void setRating(int rating) {
        this.rating = rating;
    }

    public void setTypes(ArrayList<String> types) {
        this.type = types;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public int getId() {
        return id;
    }

    public String getMovieName() {
        return movieName;
    }

    public String getCoverImg() {
        return coverImg;
    }

    public int getMovieId() {
        return movieId;
    }

    public String getUrl() {
        return url;
    }

    public String getHightUrl() {
        return hightUrl;
    }

    public String getVideoTitle() {
        return videoTitle;
    }

    public int getVideoLength() {
        return videoLength;
    }

    public int getRating() {
        return rating;
    }

    public ArrayList<String> getTypes() {
        return type;
    }

    public String getSummary() {
        return summary;
    }
}
